<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
${aier_doctype}
<html <s:property value="aier_html_xmlns" escape="false"/>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="${aier_keyworks}" name="keywords">
<meta content="${aier_description}" name="description">
<title>${aier_title}</title>
<link rel="stylesheet" href="${aier_css_url}${aier_jqui_css}ui.css" />
<link rel="Stylesheet" href="${aier_css_url}jq/jq.css" />
<link rel="stylesheet" href="${aier_css_url}social/module/jq-msg.css" />
<link rel="stylesheet"
	href="${aier_css_url}social/module/reset.css" />
<link rel="stylesheet"
	href="${aier_css_url}social/user/retrievePwd/common.css" />
<link rel="stylesheet"
	href="${aier_css_url}social/user/retrievePwd/icon.css" />
<link rel="stylesheet"
	href="${aier_css_url}social/user/retrievePwd/iv.css" />


<script type="text/javascript" src="${aier_js_url}j.js"></script>
<script type="text/javascript" src="${aier_js_url}b.js"></script>
<script type="text/javascript" src="${aier_js_url}lib/block.js"></script>
<script type="text/javascript" src="${aier_js_url}jp/msg.js"></script>
</head>
<!-- 身份验证 -->
<body>
	<div class="rp-bg">
		<div class="rp-content">
			<div class="rp-logo rp-icon rp-icon-logo"></div>
			<div class="rp-main">
				<div class="rp-main-top">
					<div class="top-title rp-icon rp-icon-title"></div>
				</div>
				<div class="rp-main-middle">
					<div class="middle-line rp-icon rp-icon-line"></div>
					<div class="middle-tabs clearfix">
						<div class="tabs-idv rp-icon-tabs rp-icon-tabs-2"></div>
						<div class="tabs-rep rp-icon-tabs rp-icon-tabs-3"></div>
						<div class="tabs-com rp-icon-tabs rp-icon-tabs-6"></div>
					</div>

					<div class="middle-content">
						<div class="content-phone">
							<div class="phone-line clearfix">
								<div class="c-ipnut-name">
									<label for="rpPhone">新密码：</label>
								</div>
								<div class="c-ipnut-area clearfix">
									<div class="ipnut-area-normal">
										<input class="PY-input" type="password" id="rpNewPwd">
									</div>
									<div class="ipnut-area-tip clearfix">
										<div class="tip-pro">
											<i id="passwordTipIcon" class="phone-c-icon rp-icon"></i> <span
												id="passwordTip"></span>
										</div>
									</div>
								</div>
							</div>


							<div class="phone-line clearfix">
								<div class="c-ipnut-name">
									<label for="rpPhone">确认新密码：</label>
								</div>
								<div class="c-ipnut-area clearfix">
									<div class="ipnut-area-normal">
										<input class="PY-input" type="password" id="rpNewPwdCon">
									</div>
									<div class="ipnut-area-tip clearfix">
										<div class="tip-pro">
											<i id="pwdTipIconCon" class="phone-c-icon rp-icon"></i> <span
												id="pwdTipCon"></span>
										</div>
									</div>
								</div>
							</div>


							<div class="phone-line clearfix">
								<div class="c-ipnut-name"></div>
								<div class="c-ipnut-area clearfix">
									<a id="rpSumBtn" href="javascript:;" class="rp-sub-btn rp-icon rp-next-btn"></a>

								</div>


							</div>


						</div>

					</div>
				</div>
				<div class="rp-main-bottom"></div>
			</div>

		</div>
	</div>
</body>
<script type="text/javascript">
	//检查密码格式
	var flag_pwd = false;
	function check_pwd() {
		var password = $("#rpNewPwd").val();
		if (password.trim() == "") {
			$("#passwordTipIcon").attr("class", "phone-c-icon rp-icon rp-icon-fork");
			$("#passwordTip").html("请输入密码");
		} else {
			$("#passwordTipIcon").attr("class", "phone-c-icon rp-icon rp-icon-hook");
			$("#passwordTip").html("");
			flag_pwd = true;
		}
	}
	$("#rpNewPwd").blur(function() {
		check_pwd();
	});
	
	//检查再次输入的密码
	var flag_pwdCon = false;
	function check_pwdCon() {
		var password = $("#rpNewPwdCon").val();
		if (password.trim() == "") {
			$("#pwdTipIconCon").attr("class", "phone-c-icon rp-icon rp-icon-fork");
			$("#pwdTipCon").html("请输入密码");
		} else if($("#rpNewPwd").val()!=password){
			$("#pwdTipIconCon").attr("class", "phone-c-icon rp-icon rp-icon-fork");
			$("#pwdTipCon").html("两次输入的密码不一致");
		}else {
			$("#pwdTipIconCon").attr("class", "phone-c-icon rp-icon rp-icon-hook");
			$("#pwdTipCon").html("");
			flag_pwdCon = true;
		}
	}
	$("#rpNewPwdCon").blur(function() {
		check_pwdCon();
	});
	
	//提交
	$("#rpSumBtn").click(function() {
		var fun = function(data) {
			if(data.s==1){
				window.location.href = "${aier_url}${aier_uri}retpwd_complete${aier_suffix}";
			}else{
				$().message("修改失败");
			}
		};
		exeAjax(ajaxUrl("${aier_url}${aier_urijs}retpwd_changeUserPwd${aier_suffix}"), fun, {
			"account" : "${account}",
			"pwd" : $("#rpNewPwd").val()
		});
	});
	
	
</script>
</html>